package SuperTest;
/*
写出下面程序的执行顺序
super()是用来初始化当前对象的父类型特征
super关键字代表的就是当前对象的那部分父类型特征
 */
public class SuperTest2 {
    public static void main(String[] args){
        new L();  //执行顺序为13654
    }
}
class J{
    public J(){
        System.out.println(1);
    }
}
class K extends J{
    public K(){
        System.out.println(2);
    }
    public K(String s){
        //这里有个super();
        System.out.println(3);
    }
}
class L extends K{
    public L(){
        this("zhangsan");
        System.out.println(4);
    }
    public L(String s){
        this(s,20);
        System.out.println(5);
    }
    public L(String s,int i){
        super(s);
        System.out.println(6);
    }
}

